home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / H-i586-cygwin32 / i586-cygwin32 / include / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-04  |  4.0 KB  |  128 lines

  1. /*
  2.  * stdlib.h
  3.  *
  4.  * Definitions for common types, variables, and functions.
  5.  */
  6.  
  7. #ifndef _STDLIB_H_
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #define _STDLIB_H_
  12.  
  13. #include "_ansi.h"
  14.  
  15. #define __need_size_t
  16. #define __need_wchar_t
  17. #include <stddef.h>
  18.  
  19. #include <sys/reent.h>
  20.  
  21. typedef struct 
  22. {
  23.   int quot; /* quotient */
  24.   int rem; /* remainder */
  25. } div_t;
  26.  
  27. typedef struct 
  28. {
  29.   long quot; /* quotient */
  30.   long rem; /* remainder */
  31. } ldiv_t;
  32.  
  33. #ifndef NULL
  34. #define NULL 0L
  35. #endif
  36.  
  37. #define EXIT_FAILURE 1
  38. #define EXIT_SUCCESS 0
  39.  
  40. #define RAND_MAX 0x7fffffff
  41.  
  42. extern int __mb_cur_max;
  43. #define MB_CUR_MAX __mb_cur_max
  44.  
  45. _VOID    _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
  46. int    _EXFUN(abs,(int));
  47. int    _EXFUN(atexit,(_VOID (*__func)(_VOID)));
  48. double    _EXFUN(atof,(const char *__nptr));
  49. #ifndef _STRICT_ANSI
  50. float    _EXFUN(atoff,(const char *__nptr));
  51. #endif
  52. int    _EXFUN(atoi,(const char *__nptr));
  53. long    _EXFUN(atol,(const char *__nptr));
  54. _PTR    _EXFUN(bsearch,(const _PTR __key,
  55.                const _PTR __base,
  56.                size_t __nmemb,
  57.                size_t __size,
  58.                int _EXFUN((*_compar),(const _PTR, const _PTR))));
  59. _PTR    _EXFUN(calloc,(size_t __nmemb, size_t __size));
  60. div_t    _EXFUN(div,(int __numer, int __denom));
  61. _VOID    _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
  62. _VOID    _EXFUN(free,(_PTR));
  63. char *  _EXFUN(getenv,(const char *__string));
  64. long    _EXFUN(labs,(long));
  65. ldiv_t    _EXFUN(ldiv,(long __numer, long __denom));
  66. _PTR    _EXFUN(malloc,(size_t __size));
  67. int    _EXFUN(mblen,(const char *, size_t));
  68. int    _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
  69. int    _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
  70. int    _EXFUN(wctomb,(char *, wchar_t));
  71. int    _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, int *));
  72. size_t    _EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
  73. size_t    _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
  74. size_t    _EXFUN(wcstombs,(char *, const wchar_t *, size_t));
  75. size_t    _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, int *));
  76. _VOID    _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
  77. int    _EXFUN(rand,(_VOID));
  78. _PTR    _EXFUN(realloc,(_PTR __r, size_t __size));
  79. _VOID    _EXFUN(srand,(unsigned __seed));
  80. double    _EXFUN(strtod,(const char *__n, char **_end_PTR));
  81. #ifndef _STRICT_ANSI
  82. float    _EXFUN(strtodf,(const char *__n, char **_end_PTR));
  83. #endif
  84. long    _EXFUN(strtol,(const char *__n, char **_end_PTR, int __base));
  85. unsigned long _EXFUN(strtoul,(const char *_n_PTR, char **_end_PTR, int __base));
  86. unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *_n_PTR, char **_end_PTR, int __base));
  87. int    _EXFUN(system,(const char *__string));
  88.  
  89. #ifndef _STRICT_ANSI
  90. _VOID    _EXFUN(cfree,(_PTR));
  91. int    _EXFUN(putenv,(const char *__string));
  92. int    _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
  93.  
  94. char *    _EXFUN(gcvt,(double,int,char *));
  95. char *    _EXFUN(gcvtf,(float,int,char *));
  96. char *    _EXFUN(fcvt,(double,int,int *,int *));
  97. char *    _EXFUN(fcvtf,(float,int,int *,int *));
  98. char *    _EXFUN(ecvt,(double,int,int *,int *));
  99. char *    _EXFUN(ecvtbuf,(double, int, int*, int*, char *));
  100. char *    _EXFUN(fcvtbuf,(double, int, int*, int*, char *));
  101. char *    _EXFUN(ecvtf,(float,int,int *,int *));
  102. char *    _EXFUN(dtoa,(double, int, int, int *, int*, char**));
  103. int    _EXFUN(rand_r,(unsigned *__seed));
  104.  
  105. #ifdef __CYGWIN32__
  106. char *    _EXFUN(realpath,(const char *, char *));
  107. void    _EXFUN(unsetenv,(const char *__string));
  108. int    _EXFUN(random,(_VOID));
  109. long    _EXFUN(srandom,(unsigned __seed));
  110. #endif
  111.  
  112. #endif /* ! _STRICT_ANSI */
  113.  
  114. char *    _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
  115. _PTR    _EXFUN(_malloc_r,(struct _reent *, size_t));
  116. _PTR    _EXFUN(_calloc_r,(struct _reent *, size_t, size_t));
  117. _VOID    _EXFUN(_free_r,(struct _reent *, _PTR));
  118. _PTR    _EXFUN(_realloc_r,(struct _reent *, _PTR, size_t));
  119. _VOID    _EXFUN(_mstats_r,(struct _reent *, char *));
  120. int    _EXFUN(_system_r,(struct _reent *, const char *));
  121.  
  122. _VOID    _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
  123.  
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif /* _STDLIB_H_ */
  128.